﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TodoApp.ResultModel;
using Volo.Abp.Application.Services;

namespace TodoApp.TMS_settlement.Pays
{
    public class TMS_PayService: ApplicationService
    {
        public readonly ITMS_PayRepository _tMS_PayRepository;
        public TMS_PayService(ITMS_PayRepository tMS_PayRepository)
        {
            _tMS_PayRepository = tMS_PayRepository;
        }
        /// <summary>
        /// 显示
        /// </summary>
        /// <param name="name"></param>
        /// <param name="department"></param>
        /// <param name="position"></param>
        /// <param name="date"></param>
        /// <param name="state"></param>
        /// <param name="pageindex"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        public async Task<PageResponse<TMS_PayDto>> GetCharge(string name, string department, string position, string date, bool? state, int pageindex, int pagesize)
        {
            return await _tMS_PayRepository.GetPay(name, department, position, date, state, pageindex, pagesize);
        }
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public async Task<int> DeleteCharge(string id)
        {
            return await _tMS_PayRepository.DeletePay(id);
        }
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="tMS_Induction"></param>
        /// <returns></returns>
        public async Task<int> UpdateCharge(TMS_Pay tMS_Charge)
        {
            return await _tMS_PayRepository.UpdatePay(tMS_Charge);
        }
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="tMS_Induction"></param>
        /// <returns></returns>
        public async Task<int> CreateCharge(TMS_Pay tMS_Charge)
        {
            return await _tMS_PayRepository.CreatePay(tMS_Charge);
        }
    }
}
